package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtSellerPromotionProducts;

public class YmtSellerPromotionProductsIMapper {
	SqlManager manage;

	public YmtSellerPromotionProductsIMapper() {
		manage = new SqlManager("YmtMarketing");
	}



	public List<YmtSellerPromotionProducts> selectProductsByPromotionId(Integer promotionId) throws InterruptedException {
	    @SuppressWarnings("unchecked")
	    List<YmtSellerPromotionProducts>  promotions = manage.getSelectResults(
	            "com.ymttest.database.mapping.YmtSellerPromotionProductsMapper.selectProductsByPromotionId", promotionId);
	    manage.commit();
	    return promotions;
	}
	

	public static void main(String[] args) throws InterruptedException {
    	System.out.print(new YmtSellerPromotionProductsIMapper().selectProductsByPromotionId(4687).get(0).getProductId());
    	
	}
}
